import { service } from "./Request";
import qs from "qs";

const reviewsApi = {
    // 获取所有评论
    getReviews(params) {
        return service({
            url: "/admin/reviews",
            method: "get",
            params
        })
    },

    // 更新评论
    updateReview(id, data) {
        return service({
            url: `/admin/reviews/${id}`,
            method: "put",
            data
        })
    },

    // 删除评论
    deleteReview(id) {
        return service({
            url: `/admin/reviews/${id}`,
            method: "delete"
        })
    }
};

export default reviewsApi; 